public class BankInterest
{
   public static void main(String[] args)
   {
      // Define constants
      final double HI_RATE = 2.75;
      final double MD_RATE = 2.00;
      final double LO_RATE = 1.00;
      final double ZERO_RATE = 0.00;
      final double DEB_CHG = -25.00;

      final double HI_LIMIT = 100000.00;
      final double MD_LIMIT = 25000.00;
      final double LO_LIMIT = 10000.00;
      final double ZERO_LIMIT = 0.00;

      // Print prompt to enter a current balence
      System.out.print("Enter current balance: ");

      // Read balance
      Scanner in = new Scanner(System.in);
      double balance = in.nextDouble();
      double newBalance=0.0;
      // Determine interest rate (or charge) based on current balance
      //   to compute new balance

      if(balance> HI_LIMIT)
       newBalance=balance*HI_RATE*0.01+balance ;
      else  if(balance>MD_LIMIT&&balance< HI_LIMIT)
       newBalance=balance*MD_RATE*0.01+balance ;
      else  if(balance> LO_LIMIT&&balance<MD_LIMIT)
       newBalance=balance*LO_RATE*0.01+balance ;
      else  if(balance>=ZERO_RATE&&balance< LO_LIMIT)
       newBalance=balance*ZERO_LIMIT*0.01+balance ;
       else
       newBalance=balance+DEB_CHG;
      System.out.printf("%.2f\n", newBalance);
   }
}